package com.vc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vc.mapper.BmsTipMapper;
import com.vc.model.entity.BmsTip;
import com.vc.service.BmsTipService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class BmsTipServiceImpl extends ServiceImpl<BmsTipMapper, BmsTip>
        implements BmsTipService {
    // 随机返回一条数据
    @Override
    public BmsTip getRandomTip() {
        BmsTip bmsTip = null;

        try {
            bmsTip = this.baseMapper.getRandomTip();
        } catch (Exception e) {
            log.info("tip转化失败");
        }

        return bmsTip;
    }
}
